import zhHans from './locale/zh-Hans.json'
import zhHant from './locale/zh-Hant.json'
const messages = {
	'zh-Hans': zhHans, // 中文简体
	'zh-Hant': zhHant  // 中文繁体
}
const i18nConfig = {
  locale: uni.getLocale(),// 获取已设置的语言
  messages
}

import Vue from 'vue'
import App from './App'
import VueI18n from 'vue-i18n'

import configs from '@/config/app.js'
import Store from '@/store/index.js'
import Cache from '@/utils/cache'

//封装方法挂载到原型上
Vue.prototype.$Config = configs;
Vue.prototype.$Cache = Cache;
Vue.prototype.$store = Store;

import "@/utils/index.js"
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.config.productionTip = false

Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)

App.mpType = 'app'
const app = new Vue({
	...App,
	Store,
	Cache,
	i18n
})
app.$mount()
